#ifndef __MEMORY_BARRIER_H__
#define __MEMORY_BARRIER_H__

// x86
#ifdef __x86_64__
#define mb() __asm__ __volatile__("mfence" ::: "memory")
#define rmb() __asm__ __volatile__("lfence" ::: "memory")
#define wmb() __asm__ __volatile__("sfence" ::: "memory")
#define smp_mb() mb()
#define smp_rmb() rmb()
#define smp_wmb() wmb()

#elif __riscv

#include "riscv_mb.h"

#endif












#endif